﻿using System;

namespace T.FAS.Runtime.DataAccess.SQLDom
{
    /// <summary>
    /// Insert语句中的插入字段类
    /// </summary>
    /// <remarks>Insert语句中的插入字段类</remarks>
    public class InsertField : Field
    {
        #region 常量

        #endregion

        //包裹列名的方法
        //public Func<string, string> FieldNameWraps { get; set; }

        /// <summary>
        /// 是否使用绑定变量
        /// </summary>
        public bool IsUseVarBinding { get; set; }

        /// <summary>
        /// 是否国际化列
        /// </summary>
        public bool IsInternational { get; set; } = false;

        /// <summary>
        /// 是否掩码列
        /// </summary>
        public bool IsMask { get; set; } = false;

        /// <summary>
        /// 原始列
        /// </summary>
        public string OriginalFieldName { get; set; }

        /// <summary>
        /// 语言区域
        /// </summary>
        public string I18NCode { get; set; }

        /// <summary>
        /// 辅助语言标识
        /// </summary>
        public string LangCode { get; set; }

        #region 方法

        /// <summary>
        /// 转换成SQL
        /// </summary>
        /// <returns>SQL</returns>
        public override string ToSQL()
        {
            //if (FieldNameWraps != null)
            //    return FieldNameWraps(FieldName);
            return FieldName;
        }

        #endregion
    }
}